<div class="site-tree">
    <div class="layui-form" style="height: 38px; margin: 10px 13px 0 0;">
        <select lay-filter="tabVersion">
            {volist name='versions' id='v'}
            <option value="{$key}" <?php echo (input('version') == $key) ? 'selected' : ''; ?>>{$v.name}</option>
            {/volist}
        </select>
    </div>
    <ul class="layui-tree">

        {if(isset($document))}
        <li><h2>序言</h2></li>
        {volist name="document" id='v'}
        <li class="site-tree-noicon <?php echo (input('name') == $key) ? 'on' : ''; ?>">
            <a href="/doc/document?name={$key}">
                <cite>{$v.name}</cite>
            </a>
        </li>
        {/volist}
        {/if}
        {volist name='menu' id='v'}
        <li>
            <h2 class="<?php echo (input('name') == $v['class']) ? 'on' : ''; ?>">
                <a href="/doc/module?name={$v.class}" style="display:initial;font-size: inherit">{$v.title}</a>
            </h2>
        </li>
        {if(isset($v.action))}
        {volist name="v.action" id='m'}
        <li class="site-tree-noicon <?php echo (input('name') == $m['href']) ? 'on' : ''; ?>">
            <a href="/doc/action?name={$m.href}&version={:input('version',0,'intval')}">
                <em>
                    {if(isset($m.version))}<span class="layui-badge layui-bg-blue">{$m.version}</span>{/if}
                </em>
                <cite>{$m.title}</cite>
                {if(isset($m.dot) && $m.dot == 1)}
                <span class="layui-badge-dot"></span>
                {/if}

            </a>
        </li>
        {/volist}
        {/if}
        {/volist}
    </ul>
</div>




